<template>
	<view class="yb-flex">
		<view @tap="app.$business.openDetail(item)" class="yb-flex yb-row yb-align-center" :style="{
			'margin-bottom': index < list.length - 1 ? '20rpx' : 0
		}" v-for="(item, index) in list" :key="index">
			<yb-avatar lazyLoad :size="60" :src="item.avatar || app.$business.filterSource(item.source).logo || '/static/logo.png'"></yb-avatar>
			<view class="yb-flex yb-flex-1" style="margin-left: 20rpx;">
				<yb-text :size="24" :lines="1" :color="titleColor || skinColor.color_1" :value="item.name" />
				<yb-text
				style="margin-top: 10rpx;"
				:size="22"
				:lines="1"
				:color="descColor || skinColor.color_3"
				:value="item.desc || '这个人很懒，什么都没有留下'" /></text>
			</view>
			<template v-if="app.$business.isFollowee(item.id)">
				<yb-button :options="{
					size: 22,
					bgColor: skinColor.color_gap_1
				}" stop @click="app.$business.toFollowee(item)" custom-style="width:130rpx;height:40rpx;" type="warning" value="取消关注"></yb-button>
			</template>
			<template v-else>
				<yb-button :options="{
					size: 22
				}" stop @click="app.$business.toFollowee(item)" custom-style="width:130rpx;height:40rpx;" type="warning" value="关注"></yb-button>
			</template>
		</view>
	</view>
</template>

<script>
	import appMixin from '@/common/mixin/app.js';
	export default{
		mixins: [appMixin],
		props: {
			list: {
				type: Array,
				default () {
					return new Array
				}
			},
			titleColor: {
				type: String,
				default: ''
			},
			descColor: {
				type: String,
				default: ''
			}
		}
	}
</script>

<style>
</style>